package com.bdd.mapper;

import com.bdd.entity.Category;
import com.bdd.model.bo.CategoryBO;
import com.bdd.model.bo.CategorySalesAmountBO;
import com.bdd.model.bo.CategorySalesVolumeBO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author huanghaining
 * @date 2022/3/18
 */

@Repository
public interface CategoryDao {
    int deleteByPrimaryKey(Integer id);

    int insert(Category record);

    int insertSelective(Category record);

    int insertSelectiveBO(CategoryBO record);

    Category selectByPrimaryKey(Integer id);

    List<Category> selectAll();

    List<Category> searchByName(@Param("name") String name);

    int updateByPrimaryKeySelective(Category record);

    int updateByPrimaryKey(Category record);

    List<CategorySalesAmountBO> selectSalesAmountGroupByCate();

    List<CategorySalesVolumeBO> getSalesVolumeGroupByCate();

    List<Integer> selectOrderItemCateId();
}